<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=div, initial-scale=1.0">
    <title>Document</title>
<style>
    .rotate{
        width: 300px;
        height: 300px;
        margin: 200px auto;

        perspective: 100px;
    }

    img {
        transition: all 2s;
    }

    .rotate:hover img{
        /* 沿x z y轴旋转图片 */
        /* transform: rotateX(360deg); */
        /* transform: rotateY(360deg); */
        transform: rotateZ(360deg);
    }
</style>

</head>
<body>
    <div class="rotate">
        <img src="x.png" />

    </div>
</body>
</html>